package com.demo.ReentrantLock;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 该demo演示了ReentranLock的常见用法
 */
public class Demo02 {
    static Lock lock = new ReentrantLock();


    public static void main(String[] args) {
        lock.lock();//加锁
        lock.unlock();//解锁
    }
}
